package com.example.application.listener;

import com.vaadin.flow.component.ClickEvent;
import com.vaadin.flow.component.ComponentEventListener;
import com.vaadin.flow.component.button.Button;

public class MyClickListener implements ComponentEventListener<ClickEvent<Button>> {
    int count=0;
    @Override
    public void onComponentEvent(ClickEvent<Button> event) {
        event.getSource().setText("You have clicked me " + (++count) + " times");
    }
    
}
